﻿define(
	['jquery','i18next','language'],
	function ($,i18n,lang) {
		var switchLanguage = function (data, viewId) {
				$.i18n.setLng(data);
				multiLanguage();
			},
			
			multiLanguage = function (section) {
			  if(section){
			    $(section).i18n();
			  } else {
			    $(document).i18n();
			  }
			};
		return {
			switchLanguage: switchLanguage,
			multiLanguage: multiLanguage,
		}
	});